﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>Web截屏控件2演示界面</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <link type="text/css" rel="stylesheet" href="zyCapture/skygqbox.css" />
    <script type="text/javascript" src="zyCapture/jquery-1.4.min.js" charset="utf-8"></script>
    <script type="text/javascript" src="zyCapture/skygqbox.js"></script>
    <script type="text/javascript" src="zyCapture/json2.min.js" charset="utf-8"></script>
    <script type="text/javascript" src="zyCapture/scp.js" charset="utf-8"></script>
    <script type="text/javascript" src="tiny_mce/tiny_mce.js"></script>
</head>
<body>
    <p>泽优全平台截屏解决方案(zyCapture)</p>
    <textarea>此示例演示截屏控件与tinymce 3.x编辑器整合的功能。</textarea>
    <div id="scpPanel"></div>    
	<script type="text/javascript" language="javascript">
        //根路径：http://localhost/api/scp/
        var pos = window.location.href.lastIndexOf("/");
        var api = [
            window.location.href.substr(0, pos + 1),
            "upload.php"
        ].join("");

        var scpMgr = zyCapture.getInstance({
            config: {
                PostUrl: api,
                Fields: { uname: "test" }
            },
            event: {
                hotKey: function () {
                    setTimeout(function () {
                        scpMgr.Capture2();
                    }, 100);
                },
                postComplete: function (url) {
                    var img = '<img src="' + url + "?t=" + new Date().getTime() + '"/>';
                    tinymce.activeEditor.execCommand("mceInsertContent", false, img);
                }
            }            
        });

		//		tinymce.init({ plugins:'wordpaster',selector: 'textarea' });
		tinyMCE.init({
		    // General options
		    mode: "textareas",
		    theme: "advanced",
		    plugins: "zycapture,autolink,lists,spellchecker,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",

		    // Theme options
		    theme_advanced_buttons1: "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect",
		    theme_advanced_buttons2: "cut,copy,paste,pastetext,pasteword,zycapture,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
		    theme_advanced_buttons3: "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print,|,ltr,rtl,|,fullscreen",
		    theme_advanced_buttons4: "insertlayer,moveforward,movebackward,absolute,|,styleprops,spellchecker,|,cite,abbr,acronym,del,ins,attribs,|,visualchars,nonbreaking,template,blockquote,pagebreak,|,insertfile,insertimage",
		    theme_advanced_toolbar_location: "top",
		    theme_advanced_toolbar_align: "left",
		    theme_advanced_statusbar_location: "bottom",
		    theme_advanced_resizing: true,

		    // Skin options
		    skin: "o2k7",
		    skin_variant: "silver",

		    // Example content CSS (should be your site CSS)
		    content_css: "css/example.css",

		    // Drop lists for link/image/media/template dialogs
		    template_external_list_url: "js/template_list.js",
		    external_link_list_url: "js/link_list.js",
		    external_image_list_url: "js/image_list.js",
		    media_external_list_url: "js/media_list.js",

		    // Replace values for the template plugin
		    template_replace_values: {
		        username: "Some User",
		        staffid: "991234"
		    }
		});
	</script>
</body>
</html>